package com.monlyu.vo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import com.monlyu.annotation.Comment;
import com.monlyu.vo.BaseVo;
import com.monlyu.vo.User;

/********************************************************************************
 * 
 * <b>功能描述☞</b>设备使用信息表<br>
 * 
 * <b>开发公司☞</b>重庆唯尼科技有限公司<br>
 * <b>版权☞</b>本文件归重庆唯尼科技有限公司所有<br>
 * <b>项目名☞</b>NewsSys<br>
 * <b>文件路径☞</b>com.monlyu.vo.DeviceUse.java<br>
 * <b>开发日期☞</b>2010-2-9 <br>
 * 
 * @author songjun
 * @since JDK 5
 * @version 1.0.8
 * 
 ********************************************************************************/
@Entity(name = "t_deviceuse")
public class DeviceUse extends BaseVo {
	@Id
	@Column(name = "du_id")
	@Comment(common = "设备使用id")
	private Long id;

	/**
	@Column(name = "du_deviceuseno", nullable = false)
	@Comment(common = "设备申请使用号")
	private String deviceuseNo;
	**/

	@ManyToOne
	@JoinColumn(name = "du_deviceid")
	@Comment(common = "当前设备信息")
	private Devices deviceid;

	@ManyToOne
	@JoinColumn(name = "du_userapp")
	@Comment(common = "设备使用人")
	private User userApp;

	@ManyToOne
	@JoinColumn(name = "du_outerappId")
	@Comment(common = "外出申请的编号")
	private OuterApp outapp;

	@ManyToOne
	@JoinColumn(name = "du_userreceive")
	@Comment(common = "设备领取人")
	private User userReceive;
	
	@Column(name = "du_receivedate")
	@Comment(common = "设备领取时间")
	private Date receiveDate;
	
	@ManyToOne
	@JoinColumn(name = "du_userrelease")
	@Comment(common = "设备发放人")
	private User userRelease;
	
	@ManyToOne
	@JoinColumn(name = "du_userreturn")
	@Comment(common = "设备归还人")
	private User userReturn;

	@ManyToOne
	@JoinColumn(name = "du_userauth")
	@Comment(common = "设备验收人")
	private User userAuth;
	
	@ManyToOne
	@JoinColumn(name = "du_userupdate")
	@Comment(common = "最后更新设备信息人")
	private User userUpdate;
	
	@Column(name = "du_use_sd")
	@Comment(common = "设备使用开始时间")
	private Date use_startdate;

	@Column(name = "du_plan_ed")
	@Comment(common = "设备计划使用结束时间")
	private Date plan_enddate;

	@Column(name = "du_real_ed")
	@Comment(common = "设备实际使用结束时间")
	private Date real_enddate;

	@Column(name = "du_usedescribe")
	@Comment(common = "设备使用用途说明")
	private String usedescribe;

	@Column(name = "du_delaydescribe")
	@Comment(common = "设备使用延期归还说明")
	private String delaydescribe;

	@Column(name = "du_deviceaffix")
	@Comment(common = "设备的相关附件")
	private String deviceaffix;

	@Column(name = "du_apporupdate")
	@Comment(common = "设备申请或更新申请操作日期")
	private Date apporUpDate;

	@Column(name = "du_hasreturn")
	@Comment(common = "设备是否已经归还")
	private boolean hasReturn = false;

	@Column(name = "du_hasoff")
	@Comment(common = "设备外借申请是否可用,注销当前的申请记录")
	private boolean hasOff = false;

	@Column(name = "du_useaddr")
	@Comment(common = "设备使用地点")
	private String useAddr;

	@Column(name = "du_hasnormal")
	@Comment(common = "设备归还时是否正常")
	private boolean hasNormal = true;

	@Column(name = "du_nonormaldesc")
	@Comment(common = "设备归还时设备损坏说明")
	private String noNormalDesc;

	public String getNoNormalDesc() {
		return noNormalDesc;
	}

	public void setNoNormalDesc(String noNormalDesc) {
		this.noNormalDesc = noNormalDesc;
	}

	public boolean isHasNormal() {
		return hasNormal;
	}

	public Date getReceiveDate() {
		return receiveDate;
	}

	public void setReceiveDate(Date receiveDate) {
		this.receiveDate = receiveDate;
	}

	public User getUserUpdate() {
		return userUpdate;
	}

	public void setUserUpdate(User userUpdate) {
		this.userUpdate = userUpdate;
	}

	public void setHasNormal(boolean hasNormal) {
		this.hasNormal = hasNormal;
	}

	public String getUseAddr() {
		return useAddr;
	}

	public void setUseAddr(String useAddr) {
		this.useAddr = useAddr;
	}

	public User getUserReturn() {
		return userReturn;
	}

	public void setUserReturn(User userReturn) {
		this.userReturn = userReturn;
	}

	public boolean isHasOff() {
		return hasOff;
	}

	public User getUserRelease() {
		return userRelease;
	}

	public void setUserRelease(User userRelease) {
		this.userRelease = userRelease;
	}

	public User getUserAuth() {
		return userAuth;
	}

	public void setUserAuth(User userAuth) {
		this.userAuth = userAuth;
	}

	public void setHasOff(boolean hasOff) {
		this.hasOff = hasOff;
	}

	public boolean isHasReturn() {
		return hasReturn;
	}

	public void setHasReturn(boolean hasReturn) {
		this.hasReturn = hasReturn;
	}

	public Date getApporUpDate() {
		return apporUpDate;
	}

	public void setApporUpDate(Date apporUpDate) {
		this.apporUpDate = apporUpDate;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}
	/**

	public String getDeviceuseNo() {
		return deviceuseNo;
	}

	public void setDeviceuseNo(String deviceuseNo) {
		this.deviceuseNo = deviceuseNo;
	}
	 */
	public Devices getDeviceid() {
		return deviceid;
	}

	public void setDeviceid(Devices deviceid) {
		this.deviceid = deviceid;
	}

	public User getUserApp() {
		return userApp;
	}

	public void setUserApp(User userApp) {
		this.userApp = userApp;
	}

	public User getUserReceive() {
		return userReceive;
	}

	public void setUserReceive(User userReceive) {
		this.userReceive = userReceive;
	}

	public Date getUse_startdate() {
		return use_startdate;
	}

	public void setUse_startdate(Date useStartdate) {
		use_startdate = useStartdate;
	}

	public Date getPlan_enddate() {
		return plan_enddate;
	}

	public void setPlan_enddate(Date planEnddate) {
		plan_enddate = planEnddate;
	}

	public Date getReal_enddate() {
		return real_enddate;
	}

	public void setReal_enddate(Date realEnddate) {
		real_enddate = realEnddate;
	}

	public String getUsedescribe() {
		return usedescribe;
	}

	public void setUsedescribe(String usedescribe) {
		this.usedescribe = usedescribe;
	}

	public String getDelaydescribe() {
		return delaydescribe;
	}

	public void setDelaydescribe(String delaydescribe) {
		this.delaydescribe = delaydescribe;
	}

	public String getDeviceaffix() {
		return deviceaffix;
	}

	public void setDeviceaffix(String deviceaffix) {
		this.deviceaffix = deviceaffix;
	}

	public OuterApp getOutapp() {
		return outapp;
	}

	public void setOutapp(OuterApp outapp) {
		this.outapp = outapp;
	}

}
